package org.smr.ministore.service.impl;

import java.util.List;

import org.blade.dao.base.BaseMapper;
import org.blade.utils.IdGenUtils;
import org.blade.utils.Pager;
import org.blade.service.base.AbstractService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.smr.ministore.dao.BrandMapper;
import org.smr.ministore.dao.BrandOrganMapper;
import org.smr.ministore.entities.Brand;
import org.smr.ministore.entities.BrandOrgan;
import org.smr.ministore.entities.vo.Assign2OrganVO;
import org.smr.ministore.entities.vo.Assign2OrgansVO;
import org.smr.ministore.service.BrandService;

import org.springframework.beans.factory.annotation.Autowired;


import org.springframework.stereotype.Service;

@Service("brandServiceFacade")
public class BrandServiceFacade extends AbstractService<Long, Brand> implements BrandService {

    private static Logger logger = LoggerFactory.getLogger(BrandServiceImpl.class);

	@Autowired
	private BrandServiceImpl service;

	@Autowired
	public BrandServiceFacade(BrandMapper mapper) {
		super(mapper);
	}

	public int save(Brand entity) {
        return service.save(entity);
	}

	public int updateById(Brand id) {
		return service.updateById(id);
	}

	public Brand queryById(Long id) {
		return service.queryById(id);
	}

	public int deleteById(Long id) {
		return service.deleteById(id);
	}

	public Pager<Brand> paginate( Brand entity, Long pageSize, Long pageNum) {
		return service.paginate(entity, pageSize, pageNum);
    }

	public int batchSave(List<Brand> entities) {
		return service.batchSave(entities);
	}


    public int batchModify(List<Brand> entities) {
        return service.batchModify(entities);
	}


    public int deleteByIdLogical(Long id) {
        return service.deleteByIdLogical(id);
    }

	public int assignToOrgans(Assign2OrgansVO assignee) {
		return service.assignToOrgans(assignee);
	}

	public int assign(Assign2OrganVO goodsAssign2Organ) {
		return service.assign(goodsAssign2Organ);
	}

	public Long getId() {
		return IdGenUtils.getNextLongId();
	}
}
